/*******************************************************************************
 * Copyright (c) 2014 Greg Marut.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 * 
 * Contributors:
 *    Greg Marut - initial API and implementation
 ******************************************************************************/
package com.gregmarut.util;

import java.util.Calendar;

/**
 * @author Greg Marut
 */
public class Log
{
	// ** Static **//
	public static boolean DISPLAY_DEBUG = true;
	public static boolean DISPLAY_INTERNAL_ERRORS = false;
	
	/**
	 * Outputs debug log content
	 * 
	 * @param strOutput
	 */
	public static void debug(String strOutput)
	{
		if (DISPLAY_DEBUG)
		{
			System.out.println("DEBUG: [" + Calendar.getInstance().getTime().toString() + "] " + strOutput);
		}
	}
	
	/**
	 * Outputs regular log content
	 * 
	 * @param strOutput
	 */
	public static void out(String strOutput)
	{
		System.out.println(strOutput);
	}
	
	/**
	 * Outputs error content
	 * 
	 * @param strError
	 */
	public static void err(String strError)
	{
		System.err.println(strError);
	}
	
	/**
	 * Outputs error content
	 * 
	 * @param objThrowable
	 */
	public static void err(Throwable objThrowable)
	{
		objThrowable.printStackTrace();
	}
}
